 <?php
/**
 * @version 0.8.3 2010-10-07
 * @package Joomla
 * @subpackage LeagueResults
 * @copyright (C)  2008, 2009, 2010 Henryk Drozd
 * @license GNU/GPL, see LICENSE.php
 * LeagueResults is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License 2
 * as published by the Free Software Foundation.

 * LeagueResults is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 */
 
// Check to ensure this file is included in Joomla!
defined('_JEXEC') or die('Restricted access');

jimport('joomla.application.component.controller');

class lrController extends JController
{
function display()
	{
	$document = JFactory::getDocument();
	$viewName = JRequest::getVar('view', 'allseasons');
	$viewType = $document->getType();
// so the code is calling the view with the name as a value of view parameter ie view
	$view = &$this->getView($viewName, $viewType);
	$model = &$this->getModel($viewName);

	if (!JError::isError($model))
		{
		$view->setModel($model, true);
		}
	
	$view->setLayout(JRequest::getVar('layout', 'default'));
	$view->display();
	}
}

?>